package com.kaver.sso.def;


import com.kaver.sso.def.enums.CodeEnum;

public class BizException extends RuntimeException {

    private static final long serialVersionUID = 1L;
    private String code;
    private String msg;

    public BizException(String code, String msg) {
        super(msg);
        this.msg = msg;
        this.code = code;

    }

    public BizException(CodeEnum codeEnum) {
        super(codeEnum.getMsg());
        this.code = codeEnum.getCode();
        this.msg = codeEnum.getMsg();
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
